

<!--uni-app的video组件以及h5的video组件手机h5端播放视频无妨横屏，坑！-->
<!--直接使用iframe播放，可以自由横竖屏切换啦-->
<template>
	<iframe :src="videoUrl" class="video-box" :allowfullscreen="true" :border="0"></iframe>
</template>

<script>  
    export default {  
		props: {
		  videoUrl: String
		},
        data() {  
            return {  
                onloadCode: `  
                const url = '{videoUrl}'  
                this.contentWindow.document.body.innerHTML = '<video style="width: 100%;height: 100%" controls="controls" src="'+url+'"></video>';  
                const iframe = top.document.getElementsByTagName('iframe')[0]  
                var evObj = document.createEvent('MouseEvents');  
                evObj.initEvent( 'event1', true, false );  
                iframe.dispatchEvent(evObj)  
                `  
            }   
        },  
        onShow() {  

        },  

        methods: {  
            event1(a) {  
                console.log(a)  
            },  
            event2(a) {  
                console.log(a)  
            }  
        }  
    }  
</script>  

<style>  
</style>  